<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:rg="http://www.ruijie.com.cn/faces/ui"
	xmlns:c="http://java.sun.com/jstl/core"
	template="/layout/contentLayout.xhtml">

	<ui:param name="param_pageTitle"
		value="#{messages.luyuan_crm_menu_order}" />
	<ui:param name="param_navigationUrl"
		value="/luyuan/sale/layout/navigationSale.jsf" />

	<ui:define name="road">
		<span>发货记录</span>
	</ui:define>

	<!-- content -->
	<ui:define name="content">
		<rg:areaPanel>
			<h:form>
				<rg:areaPanel type="searchPanel">
					<rg:fieldSet column="auto">
						<rg:calendar value="#{deliveryReportAction.date}" label="发货日期"
							datePattern="yyyy-MM-dd" showApplyButton="false" />

						<h:commandButton styleClass="button"
							value="#{messages.luyuan_crm_query}" />
					</rg:fieldSet>
				</rg:areaPanel>
				
				<div style="text-align: right;">
						<h:commandButton styleClass="largest button"
							actionListener="#{deliveryReportAction.generationReport()}" value="今日发货统计" />
						<h:commandButton styleClass="largest button"
							actionListener="#{deliveryReportAction.exportReport()}" value="导出查询结果" />
				</div>

				<rg:titlePanel headerTitle="发货记录"
					style="margin-top: 10px;" readonly="false">
					<rg:table id="deliveryReport" value="#{deliveryReportAction.dataModel}"
						var="item" pagination="disable">
						<rg:column property="product.name" title="产品名称" />
						<rg:column property="product.specification" title="产品规格" />
						<rg:column property="deliveryCount" title="出货数量" />
					</rg:table>
				</rg:titlePanel>
			</h:form>
		</rg:areaPanel>
	</ui:define>
</ui:composition>